package pat;

import java.util.Scanner;
import java.util.Vector;

public class BrokenKeyBoard {

	public static void main(String[] args) {

		Scanner s = new Scanner(System.in);
		String original = s.nextLine();
		String des = s.nextLine();
		doJob(original, des);
	}

	private static void doJob(String original, String des) {

		Vector s1 = new Vector();
		Vector s2 = new Vector();
		for (int i = 0; i < original.length(); i++) {
			if (original.charAt(i) >= 'a' && original.charAt(i) <= 'z') {
				char c = (char) (original.charAt(i) - 32);
				if (!s1.contains(c)) {
					s1.add(c);
				}

			} else {
				if (!s1.contains(original.charAt(i))) {
					s1.add(original.charAt(i));
				}

			}
		}

		for (int i = 0; i < des.length(); i++) {
			if (des.charAt(i) >= 'a' && des.charAt(i) <= 'z') {
				char c = (char) (des.charAt(i) - 32);
				if (!s2.contains(c)) {
					s2.add(c);
				}

			} else {
				if (!s2.contains(des.charAt(i))) {
					s2.add(des.charAt(i));
				}
			}
		}
		s1.removeAll(s2);
		for (int i = 0; i < s1.size(); i++) {
			System.out.print(s1.get(i));
		}

	}

}
